import 'package:bitcatflutter/widget/text_page.dart';
import 'package:flutter/material.dart';

class HomePage extends StatelessWidget {
  const HomePage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("比特猫Flutter"),
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
      ),
      body: Padding(
        padding: const EdgeInsets.all(20),
        child: ListView(
          children: [
            ElevatedButton(onPressed: ()=> jumpPage(context, "/basic_widget"), child: Text('基础组件')),
            ElevatedButton(onPressed: ()=> jumpPage(context, "/HomeSkeleton"), child: Text('首页骨架')),

          ],
        ),
      ),
    );
  }

  jumpPage(BuildContext context,String url){
    Navigator.pushNamed(context, url);
    // Navigator.push(context, MaterialPageRoute(builder: (context)=> const TextPage()));
  }
}
